package com.sunl.mall.ali.mq.api;

import com.aliyun.openservices.ons.api.transaction.TransactionStatus;
import com.sunl.mall.ali.mq.model.RocketMqMessageBody;
import com.sunl.mall.ali.mq.model.RocketMqMessageContext;
import com.sunl.mall.ali.mq.serializer.RocketMqDeserializer;


public interface RocketMqLocalTransactionMessageChecker<T> extends RocketMqDeserializer<T> {
    /**
     * 本地事务狀態
     *
     * @param body    消息体
     * @param context 上下文
     * @return 事务狀態
     * @throws Exception e
     */
    TransactionStatus check(RocketMqMessageBody<T> body, RocketMqMessageContext context) throws Exception;
}
